from django.urls import path
from cart.views import GetGoodsView, GetGoodsDetailView, CartView,AddressSelectView,AddressCreateView,CouponSelectView,CouponApplyView

urlpatterns = [
    path('goods/', GetGoodsView.as_view()),
    path('detail/', GetGoodsDetailView.as_view()),
    path('add/', CartView.as_view()),
    path('addresses/', AddressSelectView.as_view(), name='address_select'),  # 获取地址选择列表
    path('addresses/add/', AddressCreateView.as_view(), name='address_add'),  # 添加新地址
    path('coupons/', CouponSelectView.as_view(), name='coupon_select'),  # 获取可用优惠券
    path('coupons/apply/', CouponApplyView.as_view(), name='coupon_apply'),  # 应用优惠券

]